<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>
<link rel="Stylesheet" type="text/css" href="../cludg.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>
more-crud</title>
</head>
<body>
<div id="navbar">
<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
<colgroup span="3">
<col width="0*"/>
<col width="0*"/>
<col width="1*"/>
</colgroup>
<tr>
<td align="left" valign="baseline">
<a href="macros.html">
Prev:&nbsp;macros</a>
<br/>
<a href="packages.html">
Next:&nbsp;packages</a>
</td>
<td>
&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td align="left" valign="baseline">
<span class="upchain">
<b>
more-crud</b>
<br/>
<a href="../index.html">
Index</a>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;</td>
</tr>
</table>
</div>
<div class="cludg-doc-body">
<h2>
more-crud
</h2>
<table style="width: 100%;" class="summary-table">
<tr class="table-heading-color">
<th class="summary" colspan="2">
Method summary</th>
</tr>
<tr class="table-row-color">
<td class="summary-name">
<a href="more-crud.html#_g5308">
assign-key</a>
</td>
<td class="summary">
crud item foreign-item</td>
</tr>
<tr class="table-row-color">
<td class="summary-name">
<a href="more-crud.html#_g5307">
resolve-key</a>
</td>
<td class="summary">
crud item foreign-item-name</td>
</tr>
</table>
<table style="width: 100%;" class="summary-table">
<tr class="table-heading-color">
<th class="summary" colspan="2">
Function summary</th>
</tr>
<tr class="table-row-color">
<td class="summary-name">
<a href="more-crud.html#_g5306">
select-buffered</a>
</td>
<td class="summary">
crud select <em>&amp;key</em> raw (buffer-size *buffer-size*)</td>
</tr>
<tr class="table-row-color">
<td class="summary-name">
<a href="more-crud.html#_g5302">
select-mapc</a>
</td>
<td class="summary">
crud select fn <em>&amp;key</em> raw (buffer-size *buffer-size*)</td>
</tr>
<tr class="table-row-color">
<td class="summary-name">
<a href="more-crud.html#_g5303">
select-mapcar</a>
</td>
<td class="summary">
crud select fn <em>&amp;key</em> raw (buffer-size *buffer-size*)</td>
</tr>
<tr class="table-row-color">
<td class="summary-name">
<a href="more-crud.html#_g5304">
select-remove-if</a>
</td>
<td class="summary">
crud select predicate <em>&amp;key</em> raw (buffer-size *buffer-size*)</td>
</tr>
</table>
<table style="width: 100%;" class="summary-table">
<tr class="table-heading-color">
<th class="summary" colspan="2">
Macro summary</th>
</tr>
<tr class="table-row-color">
<td class="summary-name">
<a href="more-crud.html#_g5309">
define-foreign-key</a>
</td>
<td class="summary">
(item-class <em>&amp;rest</em> item-slot-names) (foreign-class <em>&amp;rest</em> foreign-slot-names) <em>&amp;key</em> assign-key</td>
</tr>
</table>
<div class="defun">
<div class="defunsignatures">
<a id="_g5307">
</a>
<table cellpadding="0" cellspacing="0" width="100%">
<colgroup span="3">
<col width="0*"/>
<col width="1*"/>
<col width="0*"/>
</colgroup>
<tbody>
<tr>
<td class="symbol-name">
resolve-key&nbsp;&nbsp;</td>
<td class="lambda-list">
crud item foreign-item-name</td>
<td class="symbol-type">
&nbsp;[Generic&nbsp;function]</td>
</tr>
</tbody>
</table>
</div>
<div class="doc-body">
<p>
Returns the instance(s) from table FOREIGN-ITEM-NAME that is 
 referenced by ITEM. 
 </p>
<p>
Example: 
 </p>
<p>
(resolve-key *crud* my-order 'customer) 
 </p>
<p>
This would return the customer referenced by my-order. 
 </p>
<p>
See ASSIGN-KEY and DEFINE-FOREIGN-KEY. 
 </p>
</div>
</div>
<div class="defun">
<div class="defunsignatures">
<a id="_g5308">
</a>
<table cellpadding="0" cellspacing="0" width="100%">
<colgroup span="3">
<col width="0*"/>
<col width="1*"/>
<col width="0*"/>
</colgroup>
<tbody>
<tr>
<td class="symbol-name">
assign-key&nbsp;&nbsp;</td>
<td class="lambda-list">
crud item foreign-item</td>
<td class="symbol-type">
&nbsp;[Generic&nbsp;function]</td>
</tr>
</tbody>
</table>
</div>
<div class="doc-body">
<p>
Links ITEM to FOREIGN-ITEM by setting slot values of ITEM in the way 
 specified by DEFINE-FOREIGN-KEY. 
 </p>
</div>
</div>
<div class="defun">
<div class="defunsignatures">
<a id="_g5302">
</a>
<table cellpadding="0" cellspacing="0" width="100%">
<colgroup span="3">
<col width="0*"/>
<col width="1*"/>
<col width="0*"/>
</colgroup>
<tbody>
<tr>
<td class="symbol-name">
select-mapc&nbsp;&nbsp;</td>
<td class="lambda-list">
crud select fn <em>&amp;key</em> raw (buffer-size *buffer-size*)</td>
<td class="symbol-type">
&nbsp;[Function]</td>
</tr>
</tbody>
</table>
</div>
<div class="doc-body">
<p>
Buffered mapc over selects. If RAW is non-nil, the crud will be 
 queried using CRUD-SELECT-RAW, otherwise CRUD-SELECT 
 </p>
</div>
</div>
<div class="defun">
<div class="defunsignatures">
<a id="_g5303">
</a>
<table cellpadding="0" cellspacing="0" width="100%">
<colgroup span="3">
<col width="0*"/>
<col width="1*"/>
<col width="0*"/>
</colgroup>
<tbody>
<tr>
<td class="symbol-name">
select-mapcar&nbsp;&nbsp;</td>
<td class="lambda-list">
crud select fn <em>&amp;key</em> raw (buffer-size *buffer-size*)</td>
<td class="symbol-type">
&nbsp;[Function]</td>
</tr>
</tbody>
</table>
</div>
<div class="doc-body">
<p>
Buffered mapcar over selects. If RAW is non-nil, the crud will be 
 queried using CRUD-SELECT-RAW, otherwise CRUD-SELECT 
 </p>
</div>
</div>
<div class="defun">
<div class="defunsignatures">
<a id="_g5304">
</a>
<table cellpadding="0" cellspacing="0" width="100%">
<colgroup span="3">
<col width="0*"/>
<col width="1*"/>
<col width="0*"/>
</colgroup>
<tbody>
<tr>
<td class="symbol-name">
select-remove-if&nbsp;&nbsp;</td>
<td class="lambda-list">
crud select predicate <em>&amp;key</em> raw (buffer-size *buffer-size*)</td>
<td class="symbol-type">
&nbsp;[Function]</td>
</tr>
</tbody>
</table>
</div>
<div class="doc-body">
<p>
Buffered remove-if over selects. If RAW is non-nil, the crud will be 
 queried using CRUD-SELECT-RAW, otherwise CRUD-SELECT 
 </p>
</div>
</div>
<div class="defun">
<div class="defunsignatures">
<a id="_g5306">
</a>
<table cellpadding="0" cellspacing="0" width="100%">
<colgroup span="3">
<col width="0*"/>
<col width="1*"/>
<col width="0*"/>
</colgroup>
<tbody>
<tr>
<td class="symbol-name">
select-buffered&nbsp;&nbsp;</td>
<td class="lambda-list">
crud select <em>&amp;key</em> raw (buffer-size *buffer-size*)</td>
<td class="symbol-type">
&nbsp;[Function]</td>
</tr>
</tbody>
</table>
</div>
<div class="doc-body">
<p>
Buffered iteration over selects. Returns a closure that will 
 return elements from the database corresponding to SELECT. If RAW 
 is non-nil, the crud will be queried using CRUD-SELECT-RAW, 
 otherwise CRUD-SELECT 
 </p>
</div>
</div>
<div class="defun">
<div class="defunsignatures">
<a id="_g5309">
</a>
<table cellpadding="0" cellspacing="0" width="100%">
<colgroup span="3">
<col width="0*"/>
<col width="1*"/>
<col width="0*"/>
</colgroup>
<tbody>
<tr>
<td class="symbol-name">
define-foreign-key&nbsp;&nbsp;</td>
<td class="lambda-list">
(item-class <em>&amp;rest</em> item-slot-names) (foreign-class <em>&amp;rest</em> foreign-slot-names) <em>&amp;key</em> assign-key</td>
<td class="symbol-type">
&nbsp;[Macro]</td>
</tr>
</tbody>
</table>
</div>
<div class="doc-body">
<p>
Defines a RESOLVE-KEY method for ITEM-CLASS and FOREIGN-CLASS. If 
 ASSIGN-KEY is non-nil, also define an ASSIGN-KEY method. 
 </p>
<p>
Example: 
 </p>
<p>
(define-foreign-key (order customer-id) (customer id) <span class="keyword">
:assign-key </span>
t) 
 </p>
<p>
This would mean that order.customer_id references customer.id and that 
 assignment is allowed with ASSIGN-KEY. Assigning a customer instance 
 to an order instance would mean setting the slot customer-id of the 
 order instance to the value of the id slot of customer instance. 
 </p>
</div>
</div>
</div>
<div class="cludg-footer">
Generated by&nbsp;<a href="mailto:ihatchondo@common-lisp.net" lang="en">
CLDOC</a>
- 2009-11-30 22:56:15</div>
</body>
</html>
